package com.yicong.ants.bean.order;

/**
 * 卡商品
 *
 * @author cch
 * @version 2020/2/22
 */
public class CardGoods {
    String price;
    String name;
    String image;
    String detail;
    String describe;
    //    类型：1=购买，2=续费，3=门票兑换
    String id;
    int type;
    int stock;
    int duration;

    public CardGoods() {
    }

    public String getPrice() {
        return this.price;
    }

    public String getName() {
        return this.name;
    }

    public String getImage() {
        return this.image;
    }

    public String getDetail() {
        return this.detail;
    }

    public String getDescribe() {
        return this.describe;
    }

    public String getId() {
        return this.id;
    }

    public int getType() {
        return this.type;
    }

    public int getStock() {
        return this.stock;
    }

    public int getDuration() {
        return this.duration;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setType(int type) {
        this.type = type;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof CardGoods)) return false;
        final CardGoods other = (CardGoods) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$price = this.getPrice();
        final Object other$price = other.getPrice();
        if (this$price == null ? other$price != null : !this$price.equals(other$price))
            return false;
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
        final Object this$image = this.getImage();
        final Object other$image = other.getImage();
        if (this$image == null ? other$image != null : !this$image.equals(other$image))
            return false;
        final Object this$detail = this.getDetail();
        final Object other$detail = other.getDetail();
        if (this$detail == null ? other$detail != null : !this$detail.equals(other$detail))
            return false;
        final Object this$describe = this.getDescribe();
        final Object other$describe = other.getDescribe();
        if (this$describe == null ? other$describe != null : !this$describe.equals(other$describe))
            return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        if (this.getType() != other.getType()) return false;
        if (this.getStock() != other.getStock()) return false;
        if (this.getDuration() != other.getDuration()) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof CardGoods;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $price = this.getPrice();
        result = result * PRIME + ($price == null ? 43 : $price.hashCode());
        final Object $name = this.getName();
        result = result * PRIME + ($name == null ? 43 : $name.hashCode());
        final Object $image = this.getImage();
        result = result * PRIME + ($image == null ? 43 : $image.hashCode());
        final Object $detail = this.getDetail();
        result = result * PRIME + ($detail == null ? 43 : $detail.hashCode());
        final Object $describe = this.getDescribe();
        result = result * PRIME + ($describe == null ? 43 : $describe.hashCode());
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        result = result * PRIME + this.getType();
        result = result * PRIME + this.getStock();
        result = result * PRIME + this.getDuration();
        return result;
    }

    public String toString() {
        return "CardGoods(price=" + this.getPrice() + ", name=" + this.getName() + ", image=" + this.getImage() + ", detail=" + this.getDetail() + ", describe=" + this.getDescribe() + ", id=" + this.getId() + ", type=" + this.getType() + ", stock=" + this.getStock() + ", duration=" + this.getDuration() + ")";
    }
}
